package com.lbw.proxy.staticproxy;

/**
 * @author lbw
 * @version 1.0
 * @date 2021/6/13 14:47
 */
public class TeacherProxy implements ITeacherDao {

    // 代理对象
    private ITeacherDao teacherDao;

    public TeacherProxy(ITeacherDao teacherDao) {
        this.teacherDao = teacherDao;
    }

    @Override
    public void teach() {

        System.out.println("开始代理....");
        teacherDao.teach();
        System.out.println("代理结束....");
    }
}
